1,653 research outputs found

    Well-Formed and Scalable Invasive Software Composition

    Get PDF
    Software components provide essential means to structure and organize software effectively. However, frequently, required component abstractions are not available in a programming language or system, or are not adequately combinable with each other. Invasive software composition (ISC) is a general approach to software composition that unifies component-like abstractions such as templates, aspects and macros. ISC is based on fragment composition, and composes programs and other software artifacts at the level of syntax trees. Therefore, a unifying fragment component model is related to the context-free grammar of a language to identify extension and variation points in syntax trees as well as valid component types. By doing so, fragment components can be composed by transformations at respective extension and variation points so that always valid composition results regarding the underlying context-free grammar are yielded. However, given a language’s context-free grammar, the composition result may still be incorrect. Context-sensitive constraints such as type constraints may be violated so that the program cannot be compiled and/or interpreted correctly. While a compiler can detect such errors after composition, it is difficult to relate them back to the original transformation step in the composition system, especially in the case of complex compositions with several hundreds of such steps. To tackle this problem, this thesis proposes well-formed ISC—an extension to ISC that uses reference attribute grammars (RAGs) to specify fragment component models and fragment contracts to guard compositions with context-sensitive constraints. Additionally, well-formed ISC provides composition strategies as a means to configure composition algorithms and handle interferences between composition steps. Developing ISC systems for complex languages such as programming languages is a complex undertaking. Composition-system developers need to supply or develop adequate language and parser specifications that can be processed by an ISC composition engine. Moreover, the specifications may need to be extended with rules for the intended composition abstractions. Current approaches to ISC require complete grammars to be able to compose fragments in the respective languages. Hence, the specifications need to be developed exhaustively before any component model can be supplied. To tackle this problem, this thesis introduces scalable ISC—a variant of ISC that uses island component models as a means to define component models for partially specified languages while still the whole language is supported. Additionally, a scalable workflow for agile composition-system development is proposed which supports a development of ISC systems in small increments using modular extensions. All theoretical concepts introduced in this thesis are implemented in the Skeletons and Application Templates framework SkAT. It supports “classic”, well-formed and scalable ISC by leveraging RAGs as its main specification and implementation language. Moreover, several composition systems based on SkAT are discussed, e.g., a well-formed composition system for Java and a C preprocessor-like macro language. In turn, those composition systems are used as composers in several example applications such as a library of parallel algorithmic skeletons

    A Domain-Specific Language and Editor for Parallel Particle Methods

    Full text link
    Domain-specific languages (DSLs) are of increasing importance in scientific high-performance computing to reduce development costs, raise the level of abstraction and, thus, ease scientific programming. However, designing and implementing DSLs is not an easy task, as it requires knowledge of the application domain and experience in language engineering and compilers. Consequently, many DSLs follow a weak approach using macros or text generators, which lack many of the features that make a DSL a comfortable for programmers. Some of these features---e.g., syntax highlighting, type inference, error reporting, and code completion---are easily provided by language workbenches, which combine language engineering techniques and tools in a common ecosystem. In this paper, we present the Parallel Particle-Mesh Environment (PPME), a DSL and development environment for numerical simulations based on particle methods and hybrid particle-mesh methods. PPME uses the meta programming system (MPS), a projectional language workbench. PPME is the successor of the Parallel Particle-Mesh Language (PPML), a Fortran-based DSL that used conventional implementation strategies. We analyze and compare both languages and demonstrate how the programmer's experience can be improved using static analyses and projectional editing. Furthermore, we present an explicit domain model for particle abstractions and the first formal type system for particle methods.Comment: Submitted to ACM Transactions on Mathematical Software on Dec. 25, 201

    Level Dynamics and Universality of Spectral Fluctuations

    Full text link
    The spectral fluctuations of quantum (or wave) systems with a chaotic classical (or ray) limit are mostly universal and faithful to random-matrix theory. Taking up ideas of Pechukas and Yukawa we show that equilibrium statistical mechanics for the fictitious gas of particles associated with the parametric motion of levels yields spectral fluctuations of the random-matrix type. Previously known clues to that goal are an appropriate equilibrium ensemble and a certain ergodicity of level dynamics. We here complete the reasoning by establishing a power law for the â„Ź\hbar dependence of the mean parametric separation of avoided level crossings. Due to that law universal spectral fluctuations emerge as average behavior of a family of quantum dynamics drawn from a control parameter interval which becomes vanishingly small in the classical limit; the family thus corresponds to a single classical system. We also argue that classically integrable dynamics cannot produce universal spectral fluctuations since their level dynamics resembles a nearly ideal Pechukas-Yukawa gas.Comment: 5 pages, RevTex, 3 figures, improved style, published versio

    Using Reference Attribute Grammar-Controlled Rewriting for Energy Auto-Tuning

    Get PDF
    Cyber-physical systems react on events reported by sensors and interact with objects of the real world according to their current state and their view of the world. This view is naturally represented by a model which is continuously analysed and updated at runtime. Model analyses should be ideally concise and efficient, requiring well-founded, comprehensible implementations with efficient reasoning mechanisms. In this paper, we apply reference attribute grammar controlled rewriting to concisely implement the runtime model of an auto-tuning case study for energy optimization. Attribute functions are used to interactively perform analyses. In case of an update, our system incrementally—and, thus, efficiently—recomputes depending analyses. Since reference attribute grammar controlled rewriting builds the required dependency graphs automatically, incremental analysis comes for free

    Towards Attribute Grammars for Metamodel Semantics

    Get PDF
    Of key importance for metamodelling are appropriate modelling formalisms. Most metamodelling languages permit the development of metamodels that specify tree-structured models enriched with semantics like constraints, references and operations, which extend the models to graphs. However, often the semantics of these semantic constructs is not part of the metamodel, i.e., it is unspeci ed. Therefore, we propose to reuse well-known compiler construction techniques to specify metamodel semantics. To be more precise, we present the application of reference attribute grammars (RAGs) for metamodel semantics and analyse commonalities and differences. Our focus is to pave the way for such a combination, by exemplifying why and how the metamodelling and attribute grammar (AG) world can be combined and by investigating a concrete example - the combination of the Eclipse Modelling Framework (EMF) and JastAdd, an AG evaluator generator

    Providing Mainstream Parser Generators with Modular Language Definition Support

    Get PDF
    The composition and reuse of existing textual languages is a frequently re-occurring problem. One possibility of composing textual languages lies on the level of parser specifications which are mainly based on context-free grammars and regular expressions. Unfortunately most mainstream parser generators provide proprietary specification languages and usually do not provide strong abstractions for reuse. New forms of parser generators do support modular language development, but they can often not be easily integrated with existing legacy applications. To support modular language development based on mainstream parser generators, in this paper we apply the Invasive Software Composition (ISC) paradigm to parser specification languages by using our Reuseware framework. Our approach is grounded on a platform independent metamodel and thus does not rely on a specific parser generator

    Extended Version of Elucidative Development for Model-Based Documentation and Language Specification

    Get PDF
    Documentation is an essential activity in software development, for source code as well as modelling artefacts. Typically, documentation is created and maintained manually which leads to inconsistencies as documented artefacts like source code or models evolve during development. Existing approaches like literate/elucidative programming or literate modelling address these problems by deriving documentation from software development artefacts or vice versa. However, these approaches restrict themselves to a certain kind of artefact and to a certain phase of the software development life-cycle. In this paper, we propose elucidative development as a generalisation of these approaches supporting heterogeneous kinds of artefacts as well as the analysis, design and implementation phases of the software development life-cycle. Elucidative development allows for linking source code and model artefacts into documentation and thus, maintains and updates their presentation semi-automatically. We present DEFT as an integrated development environment for elucidative development. We show, how DEFT can be applied to language specifications like the UML specification and help to avoid inconsistencies caused by maintenance and evolution of such a specification

    A language and development environment for parallel particle methods

    Get PDF
    We present the Parallel Particle-Mesh Environment (PPME), a domain-specific language (DSL) and development environment for numerical simulations using particles and hybrid particle-mesh methods. PPME is the successor of the Parallel Particle-Mesh Language (PPML), a Fortran-based DSL that provides high-level abstrac- tions for the development of distributed-memory particle-mesh simulations. On top of PPML, PPME provides a complete development environment for particle-based simu- lations usin state-of-the-art language engineering and compiler construction techniques. Relying on a novel domain metamodel and formal type system for particle methods, it enables advanced static code correctness checks at the level of particle abstractions, com- plementing the low-level analysis of the compiler. Furthermore, PPME adopts Herbie for improving the accuracy of floating-point expressions and supports a convenient high-level mathematical notation for equations and differential operators. For demonstration purposes, we discuss an example from Discrete Element Methods (DEM) using the classic Silbert model to simulate granular flows
    • …
    corecore